-- GENERATED SPELL FOR [Bloodtalon Scythemaw] --


function spell0_3123(pUnit, Event) --@Claw,n/a--
pUnit:FullCastSpellOnTarget(16828,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3123', 579, 1)
end

function spell1_3123(pUnit, Event) --@Cower,n/a--
pUnit:FullCastSpellOnTarget(1742,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3123', 0, 1)
end

function spell2_3123(pUnit, Event) --@Growl,n/a--
pUnit:FullCastSpellOnTarget(2649,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3123', 0, 1)
end

function spell3_3123(pUnit, Event) --@Growl,n/a--
pUnit:FullCastSpellOnTarget(14916,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3123', 0, 1)
end

function spell4_3123(pUnit, Event) --@Rushing Charge,Self--
pUnit:FullCastSpellOnTarget(6268,pUnit)
pUnit:RegisterEvent('Sorts_3123', 3000, 1)
end

function spell5_3123(pUnit, Event) --@Savage Rend,n/a--
pUnit:FullCastSpellOnTarget(50498,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3123', 15000, 1)
end

function Sorts_3123(pUnit, Event)
local choix_sorts_3123 = math.random(0, 5)
if choix_sorts_3123 == 0 then
pUnit:RegisterEvent('spell0_3123', 1, 1)
end
if choix_sorts_3123 == 1 then
pUnit:RegisterEvent('spell1_3123', 1, 1)
end
if choix_sorts_3123 == 2 then
pUnit:RegisterEvent('spell2_3123', 1, 1)
end
if choix_sorts_3123 == 3 then
pUnit:RegisterEvent('spell3_3123', 1, 1)
end
if choix_sorts_3123 == 4 then
pUnit:RegisterEvent('spell4_3123', 1, 1)
end
if choix_sorts_3123 == 5 then
pUnit:RegisterEvent('spell5_3123', 1, 1)
end
end

function mob3123_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_3123', math.random(1500, 3000), 1)
end

function mob3123_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3123_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3123_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(3123, 1, 'mob3123_Action')
RegisterUnitEvent(3123, 2, 'mob3123_Leave')
RegisterUnitEvent(3123, 3, 'mob3123_Kill')
RegisterUnitEvent(3123, 4, 'mob3123_Die')
